<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.yaodian100.crm.workflow.entity.WorkFlowNode" %>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>

<c-rt:if test="${!empty param.id}">
<c-rt:set var="gcw" value="${pu:get('com.yaodian100.crm.cs.entity.GroupContactWindow', param.id) }"/>
</c-rt:if>
<c-rt:set var="group" value="${pu:get('com.yaodian100.core.admin.entity.Group', param.id)}"/>
${pu:criteriaForName('com.yaodian100.core.menu.entity.Menu')}
${pu:criteriaAdd(pu:criteria('eq', 'key', 'WorkOrderHoliday.class'))}
<c-rt:set var="holidayTypes" value="${pu:criteriaResult(null)}"/>
<form name="updateContactWindowForm" method="post">
<table class="tb-data" width="100%">

<tr>

<th>处理部门</th>
<td>${group.description}
  <input type="hidden" name="groupId" value="${param.id }"/>
  <input type="hidden" name="id" value="${param.id }"/>
  
  </td>
</tr>
<tr>
  <th>通知窗口姓名</th><td><input type="text" name="name" value="${gcw.name }"/>
</td></tr>
<tr>
<th>通知窗口email（多个以,分隔）</th><td><input type="text" size="50" name="to" value="${gcw.toMail }"/>
</td></tr>
<tr>
<th>副本收件者（多个以,分隔）</th><td><textarea name="cc" rows="4" cols="50">${gcw.ccMail }</textarea>
</td></tr>
<tr>
<th>行事历类别</th><td>
<select name="holidayId">
	<c-rt:forEach items="${holidayTypes[0].options}" var="option">
    	<option value="${option.value.code}">${option.value.name}</option>
    </c-rt:forEach>
</select>

</td></tr>
<tr>
<th>建立人员</th><td>${gcw.createUser}
</td></tr>
<tr>
<th>建立日期</th>
<td><fmt-rt:formatDate value="${gcw.createDate}" pattern="yyyy/MM/dd HH:mm"/></td>
</tr>
<tr>
  <th></th>
  <td><input type="button" value="送出" id="submit_button"/>
    <input type="reset" value="重置"/></td>
</tr>
</table>
</form>
<script>
$(function(){
	$('#submit_button').click(function(){
		doAR('<%=application.getContextPath() %>/cs/contactWindow/update.do','dialog', 'updateContactWindowForm', function(){
			doAR('<%=application.getContextPath()%>/cs/contactWindow/page.do?iamlazy=list&AJAX=true', 'main');
		});
	});
});
</script>